feat(UI): add mega API config#1029
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds configuration support for the Mega API by introducing a new API URL and client, along with a test page and hook to verify integration.
- Introduces a new API constant in the config package.
- Creates a legacy API client in the web utilities.
- Adds a test page and hook for API connectivity and updates CSP settings in Next.js.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| moon/packages/config/src/index.ts | Added LEGACY_API_URL with Mega API configuration for non-production environments. |
| moon/apps/web/utils/queryClient.ts | Imported LEGACY_API_URL and instantiated legacyApiClient for communicating with the Mega API. |
| moon/apps/web/pages/[org]/testapi/index.tsx | Added a new test page to display API test results using the new API endpoint. |
| moon/apps/web/next.config.js | Updated Content Security Policy to include the new API URL. |
| moon/apps/web/hooks/useTestInfo.ts | Added a hook to fetch test API information from the new legacyApiClient. |
Comments suppressed due to low confidence (1)
moon/packages/config/src/index.ts:27
- The constant is named LEGACY_API_URL but the comment refers to it as 'Mega API URL'. Consider renaming the constant to MEGA_API_URL for clarity or updating the comment to match the naming.
// Mega API URL
benjamin-747
enabled auto-merge
May 15, 2025 09:18
auto-merge was automatically disabled
May 15, 2025 09:48
Head branch was pushed to by a user without write access
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
benjamin-747
approved these changes
May 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.